package com.alameda.mapper.manage;

import com.alameda.manage.pojo.BusinessIndicatorDO;
import com.alameda.manage.vo.BusinessIndicatorVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * 技术指标 数据控制层
 *
 * @author Lv
 * @date 2024/08/04
 */
@Mapper
public interface BusinessIndicatorMapper extends BaseMapper<BusinessIndicatorDO> {
    /**
     * 通过id集合查询业务指标信息
     *
     * @param idCollection id集合
     * @return
     */
    List<BusinessIndicatorVO> findByIdIn(@Param("idCollection") Collection<Long> idCollection);

    /**
     * 查询分页数据
     *
     * @param page                    分页对象
     * @param projectId               项目id
     * @param businessIndicatorRemark 业务指标描述
     * @param state                   状态
     * @param indexNo                 指标编号
     * @param priority                优先级
     * @return
     */
    IPage<BusinessIndicatorVO> findBusinessIndicatorInfo(@Param("page") IPage<BusinessIndicatorDO> page,
                                                         @Param("projectId") Long projectId,
                                                         @Param("businessIndicatorRemark") String businessIndicatorRemark,
                                                         @Param("state") Integer state,
                                                         @Param("indexNo") String indexNo,
                                                         @Param("priority") String priority);
}
